<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ page import="com.ecable.bean.PackagesTO"%>
<%@page import="com.ecable.daoImpl.PackagesDaoImpl"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>


		<title>My JSP 'Sample.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<script type="text/javascript" src="script/mm_menu.js"> </script>
		<script type="text/javascript" src="script/general.js"> </script>
		<script type="text/javascript" src="script/gen_validatorv31.js"> </script>
		<script type="text/javascript" src="script/form_validation.js"> </script>

	</head>
	<%
		Vector<PackagesTO> vpack;
		if (session.getAttribute("user") == null)
			response.sendRedirect("LoginForm.jsp?status=Session Expired");
	%>
	<body>
		<jsp:include page="Header.jsp"></jsp:include>
		<tr>
			<td>
				<%
					if (request.getParameter("status") != null) {
				%>
				<font color="red"><%=request.getParameter("status")%></font>
				<%
					}
				%>
				<form name="BillPayAction" action="./BillPayAction">
					<table align="center" bgcolor="#ffddd">
						<tr>
							<td align="center" bgcolor="nabi" colspan="2">
								<font color="white"><b>BillPay Form</b> </font>
							</td>
						</tr>
						<tr>
							<td align='right'>
								<b>Connection Name :</b>
							</td>
							<td>
								<select name="connid">
									<option value="">
										--select--
									</option>
									<%
										int userid = (Integer) (session.getAttribute("userid"));
										vpack = new PackagesDaoImpl().viewConnection(userid);
										if (vpack != null) {
											System.out.println("Hsi");
										}
										System.out.println("haiiiiiiiiii" + session.getAttribute("userid"));
										Iterator it = vpack.listIterator();
										while (it.hasNext()) {
											PackagesTO pack = (PackagesTO) it.next();
									%>
									<option value="<%=pack.getConnid()%>"><%=pack.getConnplan()%></option>
									<%
										}
									%>
								</select>
							</td>
						</tr>
						<tr>
							<td align='right'>
								BankName :
							</td>
							<td>
								<select name="BankName">
									<option value="">
										select
									</option>
									<option value="StateBankOfIndia">
										StateBankOfIndia
									</option>
									<option value="AndhraBank">
										AndhraBank
									</option>
									<option value="ICICI">
										ICICI
									</option>
									<option value="HDFC">
										HDFC
									</option>

								</select>
							</td>
						</tr>
						<tr>
							<td align='right'>
								Amount :
							</td>
							<td>
								<input type='text' value='' name='Amount'>
							</td>
						</tr>
						<tr>
							<td align='right'>
								BANK DD/Chalana NO :
							</td>
							<td>
								<input type="text" name="bankdd">
							</td>
						</tr>
						<tr>
							<td align='right'>
								<input type="submit" value="Apply ">
							</td>
							<td align='left'>
								<input type="reset" value="cancel">
							</td>
						</tr>
						<input type="hidden" name="userid"
							value='<%=session.getAttribute("userid")%>'>
					</table>
				</form>
				<script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("NewConnectionAction");
  
</script>


				<jsp:include page="Footer.jsp"></jsp:include>
	</body>
</html>
